<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/base.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/info-mgt.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/WdatePicker.css" />
<title>网上招聘系统</title>
<style type="text/css">
	a:link {
 	font-size: 12px;
 	color: #000000;
	text-decoration: none;
	}
	a:visited {
	font-size: 12px;
	color: #000000;
 	text-decoration: none;
	}
	a:hover {
 	font-size: 12px;
 	color: #999999;
 	text-decoration: none;
	}
</style>
</head>
<body>
<div class="title"><h2>岗位管理</h2></div>

<div class="table-box">
	<table>
    	<thead>
        	<tr>
            	<th class="num">序号</th>
            	<th class="node">标题</th>
                <th class="name">公司姓名</th>
                <th class="node">专业</th>
                <th class="node">薪资</th>
                <th class="node">联系方式</th>
                <th class="node">状态</th>
                <th class="node">操作</th>
            </tr>
        </thead>
        <tbody>
        	<c:if test="${fn:length(dataList) == 0 }">
        		<tr>
            		<td class="num"></td>
                	<td class="node"></td>
                	<td class="node"></td>
                	<td class="name">您还没有招聘信息，</td>
                	<td class="nmae">去创建一个吧</td>
                	<td class="node"></td>
                	<th class="node"></th>
                	<td class="node"></td>
            	</tr>
        	</c:if>
			<c:forEach items="${dataList }" var ="job"  begin="0" varStatus="status">  
				<tr>
            		<td class="num">${status.count }</td>
                	<td class="node"><a style="color:blue" href="${pageContext.request.contextPath }/company/view/job/${job.id }.action">${job.title}</a></td>
                	<td class="name">${job.companyName}</td>
                	<td class="node">${job.profession}</td>
                	<td class="node">&nbsp;${job.salary}</td>
                	<td class="node">${job.phone}</td>
                	<c:if test="${job.isPublic == true }"><th class="node"><font style="color: green">&nbsp;发布</font></th></c:if>
                	<c:if test="${job.isPublic == false }"><th class="node"><font style="color: red">&nbsp;未发布</font></th></c:if>
                	<td class="node">
                		<a style="color:blue" href="${pageContext.request.contextPath }/company/toUpdate/job/${job.id}.action">修改</a>&nbsp;&nbsp;&nbsp;
                		<a style="color:red" href="${pageContext.request.contextPath }/company/delete/job/${job.id}.action">删除</a>&nbsp;&nbsp;&nbsp;
                	</td>
            	</tr>
      		</c:forEach>  
        </tbody>
    </table>
</div>
<div class="pagination ue-clear"></div>
<div class="btn ue-clear">
	<input type="button" style="height:50px;width:150px;background-color:#68B86C;color:white;border-radius:10px" onclick="addJobSubmit();" value="添加招聘"/>
</div>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/WdatePicker.js"></script>
<!--  <script type="text/javascript" src="js/jquery.pagination.js"></script>-->
<!--<script type="text/javascript">
 $('.pagination').pagination(100,{
	callback: function(page){
	},
	display_msg: true,
	setPageNo: true
});-->
<script type="text/javascript">
$("tbody").find("tr:odd").css("backgroundColor","#eff6fa");
function addJobSubmit() {
	console.log("addSubmit--");
	//window.open("${pageContext.request.contextPath }/company/toAdd/job/${companyId}.action","_self");
	window.location.href="${pageContext.request.contextPath }/company/toAdd/job/${companyId}.action";
}
</script>
</html>